package com.edu.bean;

public class User {

    private String username;

    private String password;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        System.out.println("执行了username属性的set方法");
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        System.out.println("执行了password属性的set方法");
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    public User() {
        System.out.println("执行了user的无参数构造方法");
    }


    public User(String u, String p) {
        this.username = u;
        this.password = p;
    }
}
